package com.focusai.efairy.network.exception;

/**
 * Created by heqingbao on 2016/8/5.
 */
public class ServerException extends NetworkException {

    private int mErrorCode;
    private String mErrorMessage;

    public ServerException(int errorCode, String errorMessage) {
        super();
        mErrorCode = errorCode;
        mErrorMessage = errorMessage;
    }

    @Override
    public int getErrorCode() {
        return mErrorCode;
    }

    @Override
    public String getErrorMessage() {
        if (mErrorMessage == null) {
            return "服务器异常，请稍后重试";
        }

        return mErrorMessage;
    }
}
